﻿<UserControl x:Class="P_PersonalDetails.MedicalAndEmergency"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="600" d:DesignWidth="500">
    <UserControl.Resources>
        <ResourceDictionary Source="FormStyling.xaml"/>
    </UserControl.Resources>
    <Border Style="{StaticResource BoxBorder}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="100"/>
            </Grid.RowDefinitions>
            <TextBlock Style="{StaticResource BoxHeading}">
                <Run Text="Medical and Emergency Details for"/>
                <Run Text="{Binding FullName}"/>
            </TextBlock>
            <TextBlock Style="{StaticResource SubText}" Grid.Row="1">Please note that this section is mandatory for those under 18, but adults may also wish to include any relevant details for their own saftey.</TextBlock>
            <TextBlock Grid.Row="2" Style="{StaticResource SubText}">
                <Run Text="Please tick &quot;opt out&quot; box if you do "/>
                <Run TextDecorations="Underline" Text="not"/>
                <Run Text=" want the emergency contact numbers printed on the signing-in sheet at the club.  The contact name will only be printed if one of the numbers is printed."/>
            </TextBlock>
            <Grid Grid.Row="3">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*" MaxWidth="300"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Column="2">Opt Out</TextBlock>
                
                <TextBlock Grid.Row="1" VerticalAlignment="Center">Emergency Contact Name</TextBlock>
                <TextBlock Grid.Row="2" VerticalAlignment="Center">Emergency Home Number</TextBlock>
                <TextBlock Grid.Row="3" VerticalAlignment="Center">Emergency Mobile Number</TextBlock>

                <TextBox Grid.Column="1" Margin="2" Grid.Row="1" Text="{Binding EMContactName, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBox Grid.Column="1" Margin="2" Grid.Row="2" Text="{Binding EMContactPhone, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBox Grid.Column="1" Margin="2" Grid.Row="3" Text="{Binding EMContactMobile, Mode=TwoWay, ValidatesOnExceptions=True}"/>

                <CheckBox Grid.Row="2" Grid.Column="2" IsChecked="{Binding EMPhoneOptOut, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <CheckBox Grid.Row="3" Grid.Column="2" IsChecked="{Binding EMMobileOptOut, Mode=TwoWay, ValidatesOnExceptions=True}"/>
            </Grid>
            <CheckBox Grid.Row="4" HorizontalAlignment="Stretch" IsChecked="{Binding CanSwim, Mode=TwoWay, ValidatesOnExceptions=True}">
                <TextBlock>Please tick if you can swim 50m in light clothing</TextBlock></CheckBox>
            <TextBlock Style="{StaticResource SubText}" Grid.Row="5">The following information will only be made available to organising coaches and club officials</TextBlock>
            <Grid Grid.Row="6">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition MaxWidth="300"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Text="Doctor's Name" VerticalAlignment="Center"/>
                <TextBlock Grid.Row="1" Text="Doctor's Telephone" VerticalAlignment="Center"/>

                <TextBox Grid.Column="1" Margin="2" Grid.Row="0" Text="{Binding DrName, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBox Grid.Column="1" Margin="2" Grid.Row="1" Text="{Binding DrPhone, Mode=TwoWay, ValidatesOnExceptions=True}"/>
            </Grid>
            <TextBlock Grid.Row="7">Allergies and medical conditions including details and dosage of medication:</TextBlock>
            <TextBox Grid.Row="8" AcceptsReturn="True" Margin="2" Text="{Binding Medical, Mode=TwoWay, ValidatesOnExceptions=True}"/>
        </Grid>
    </Border>
</UserControl>
